package com.example.bailin.giftsay.entity;

import com.litesuits.orm.db.annotation.PrimaryKey;
import com.litesuits.orm.db.enums.AssignType;

import java.util.Comparator;

/**
 * Created by bailin on 16/9/1.
 */
public class GuanZhuEntity implements Comparator {
    @PrimaryKey(AssignType.AUTO_INCREMENT)
    private int id;
    private String type;
    private String imgUrl;
    private String price;
    private String title;
    private String count;
    private long data;
    private String userName;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public long getData() {
        return data;
    }

    public void setData(long data) {
        this.data = data;
    }

    @Override
    public int compare(Object lhs, Object rhs) {
        GuanZhuEntity g1 = (GuanZhuEntity) lhs;
        GuanZhuEntity g2 = (GuanZhuEntity) rhs;
        return new Long(g2.getData()).compareTo(g1.getData());
    }
}
